import requests
import re

url = 'http://xyq.gm.163.com/cgi-bin/csa/csa_sprite.py?act=ask&question={}&product_name=xyq'.format('人参果购买')

# url.format(quote("", 'utf-8').__str__())
print(url)
html = requests.get(url)
str_to_dict = eval(html.text)
# 去除所有数字符号
result = str_to_dict['answer']
# pattern = re.compile(r'[^\u4e00-\u9fa5]')
# chinese = re.sub(pattern, "",result)
pattern = re.compile(r'<[^>]+>', re.S)
chinese = pattern.sub('', result)
# print(result) 
print(chinese)
